import request from "../utils/request"

// 权限列表
export const getPermissionList = params => {
    return request({
        method: 'POST',
        url: '/queryPermissionByCondition',
        params: params
    })
}

// 新增权限
export const addPermission = params => {
    return request({
        method: 'POST',
        url: '/addPermission',
        params: params
    })
}

// 修改权限
export const updatePermission = params => {
    return request({
        method: 'POST',
        url: '/updatePermission',
        params: params
    })
}

// 查询所有腹肌权限
export const queryParentPermission = params => {
    return request({
        method: 'GET',
        url: '/queryAllParentPermission',
        params:params
    })
}

// 按照等级查询所有权限包含子集权限（用于tree）
export  const queryAllPermissionForRank = () => {
    return request({
        method: 'GET',
        url: '/queryAllPermissionForRank',
    })
}

// 根据id查询权限信息
export const queryPermissionInfo = params => {
    return request({
        method: 'GET',
        url: '/queryPermissionById',
        params: params
    })
}

// 查询所有菜单列表
export const queryAllMenuList = () => {
    return request({
        method: 'GET',
        url: '/queryAllMenuList'
    })
}

